package second;

public class BankOfDalian extends Bank{
    double year;

    public BankOfDalian(int savedMoney, double year, double interest) {
        super(savedMoney, (int)year, interest);
        this.year = year;
    }

    @Override
    public double ComputerInterest() {
        double yearInterest = super.ComputerInterest();
        double days = this.year - super.year;
        double daysInterest = days * interest * savedMoney;
        return yearInterest + daysInterest;
    }
}